From: Jasper St. Pierre Date: Sat, 19 Mar 2011 23:36:17 +0000 (-0400) Subject: Fix workspaces accumulating on each restart. X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8562 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b16de0e374fd607bf1f5fbe94b236750c30514d0;p=gnome-shell.git Fix workspaces accumulating on each restart. Main._nWorkspacesChanged was racing with Main._checkWorkspaces. If _checkWorkspaces won the race, _workspaces was uninitialized. Because of this, _checkWorkspaces only noticed workspaces with windows on them, leading it to believe the last workspace wasn't empty, and added a new, empty workspace. https://bugzilla.gnome.org/show_bug.cgi?id=645343 --- diff --git a/js/ui/main.js b/js/ui/main.js index 47dadef3b..155cdb299 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -223,7 +223,7 @@ function start() { global.screen.connect('window-entered-monitor', _windowEnteredMonitor); global.screen.connect('window-left-monitor', _windowLeftMonitor); - Mainloop.idle_add(_nWorkspacesChanged); + _nWorkspacesChanged(); } let _workspaces = [];